import com.itheima.domain.Account;
import com.itheima.service.AccountService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class APP {
    public static void main(String[] args) {
        ApplicationContext  ctx=new ClassPathXmlApplicationContext("applicationContext.xml");
        AccountService accountService = (AccountService) ctx.getBean("accountService");

       /* Account ac = accountService.findbyid(1);
        System.out.println(ac);*/
        List<Account> all = accountService.findAll();
        for (Account account : all) {
            System.out.println(account);
        }


     /*   Account account=new Account();
        account.setName("TOM");
        account.setMoney(1234567.89);
        accountService.save(account);*/


    }
}
